/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const storeRouter = {
  path: '/store',
  component: Layout,
  redirect: 'noRedirect',
  name: 'Store',
  alwaysShow: true,
  meta: {
    title: '便利店管理',
    icon: 'store',
    permission: '/store'
  },
  children: [
    {
      path: 'category',
      component: () => import('@/views/store/category'),
      name: 'category',
      meta: { title: '商品分类管理', icon: 'category', noCache: true, permission: '/store/category' }
    },
    {
      path: 'supplier',
      component: () => import('@/views/store/supplier'),
      name: 'supplier',
      meta: { title: '供应商管理', icon: 'supplier', noCache: true, permission: '/store/supplier' }
    },
    {
      path: 'commodity',
      component: () => import('@/views/store/commodity'),
      name: 'Commodity',
      meta: { title: '商品管理', icon: 'commodity', noCache: false, permission: '/store/commodity' }
    },
    {
      path: 'online',
      component: () => import('@/views/store/online'),
      name: 'Online',
      meta: { title: '线上商品', icon: 'online', noCache: false, permission: '/store/online' }
    },
    {
      path: 'stock',
      component: () => import('@/views/store/stock'),
      name: 'Stock',
      meta: { title: '商品库存', icon: 'stock', noCache: false, permission: '/store/stock' }
    },
    {
      path: 'sale',
      component: () => import('@/views/store/sale'),
      name: 'Sale',
      meta: { title: '商品销售', icon: 'sale', noCache: false, permission: '/store/sale' }
    }
  ]
}

export default storeRouter
